<div class="container-fluid">
      <div class="row-fluid container_bg">
        <div ng-include="'side-menu.html'"></div>
        <div class="span9 pos_r" style="padding-right:20px;">
			<div class="container_title">
				<div class=""><h1>Order History</h1></div>
				<div  id="success_alert" class="alert_sucess alert alert-success span11" style="display:none;">
					<i class="icon-ok"></i>&nbsp;&nbsp;
					<span  id="cancelled_order"></span>
				</div>
			<div class="container_form_top table-responsive" id="orderHistory">
					<table ng-table="tableParams" class="table">
						<tr ng-repeat="user in $data">
							<td data-title="'Send Date'">{{user.date_added}}
							</td>
							<td data-title="'Prescription'">
								Tabletname:{{user.Tabletname}}<br/>
								Quantity:{{user.Quantity}}<br/>
								<a ng-if='user.preLength >1' ng-click="openPopups(1,user.user_medicine_order_id)" href="javascript:void(0);" >ViewAll</a>
							</td>
							<td data-title="'Attachment'">
								<p>
									<img ng-src="{{user.preImage}}" width="100px" height="100px"/>
								</p>
								<a ng-if='user.preImageLength >1' href="javascript:void(0);" ng-click="openPopups(3,user.user_medicine_order_id)">ViewAll</a>
							</td>
							<td id='status{{user.user_medicine_order_id}}' data-title="'status'">
								<p ng-if='user.status==1 && user.shop_order_status==0'>Pending</p>
								<p ng-if='user.status==1 && user.shop_order_status==1'>Sent Price</p>
								<p  ng-if='user.status==1 && user.shop_order_status==2'>Confirm Order</p>
								<p ng-if='user.status==2'>Processed</p>
								<p ng-if='user.status==3'>Cancelled</p>
							</td>
							<td id='b{{user.user_medicine_order_id}}' data-title="'Action'">
									<p ng-if='user.status==2'><a href="javascript:void(0)" ng-click="openPopups(2,user.user_medicine_order_id)">View</a></p>
									<p ng-if='user.status==3'><a href="javascript:void(0)" ng-click="openPopups(2,user.user_medicine_order_id)">View</a></p>
									<p ng-if='user.status==1 && user.shop_order_status==0'><a href="javascript:void(0)" ng-click="openPopups(4,user.user_medicine_order_id)">Send Price</a>/<a href="javascript:void(0)" ng-click="openPopups(2,user.user_medicine_order_id)">View</a></p>
									<p ng-if='user.status==1 && user.shop_order_status==1'><a href="javascript:void(0)" ng-click="openPopups(2,user.user_medicine_order_id)">View</a></P>
									<p ng-if='user.status==1 && user.shop_order_status==2'><a href="javascript:void(0)" ng-click="orderConfirm(user.user_medicine_order_id)">Complete Order</a>/<a href="javascript:void(0)" ng-click="openPopups(2,user.user_medicine_order_id)">View</a></p>								
							</td>
						</tr>
					</table>
				</div>
				<div>{{ emptyOrders }}</div>
			</div>
        </div>
      </div>
    </div>
	<script id="viewPriscription.html" type="text/ng-template">
		<div class="ngdialog-message" >
			<div class="modal-header" >
				<h3 id="myModalLabel" >Prescription</h3>
			</div>
			<center><div ng-bind-html="loadPre"></div></center>
			<table class="table table-condensed" ng-bind-html="allPriscription" >
			</table>
		</div>
	</script>
<script id="viewDetails.html" type="text/ng-template">
	<div class="ngdialog-message" >
		<div class="modal-header">
			<h3 id="myModalLabel">Order Detailes</h3>
		</div>
		<center><div ng-bind-html="loadPre"></div></center>
		<table class="table table-condensed" ng-bind-html="allDetails">
		</table>	
	</div>
</script>
<script id="viewAllPreImages.html" type="text/ng-template">
	<div class="ngdialog-message" >	
			<center><div ng-bind-html="loadPre"></div></center>
			<wallop-slider
				data-images="images"
				data-animation="rotate"
				data-current-item-index="index"
				data-on-previous="updateTsPrevious()"
				data-on-next="updateTsNext()"
			></wallop-slider>
		</div>
</script>
<script id="sendPrice.html" type="text/ng-template">
	<div class="ngdialog-message" >
		<div class="modal-header">
			<h3 id="myModalLabel">send quotation price</h3>
		</div>
		<center><div ng-bind-html="loadPre"></div></center>
		<span class="table table-condensed" id="sendprice">
		</span>	
	</div>
</script>

